<script>
	import { cacheGet} from './utils/cache.js';
	export default {
		onLaunch: function() {

			// #ifdef APP-PLUS
			// 锁定屏幕方向
			plus.screen.lockOrientation('portrait-primary'); //锁定
			// 检测升级
			// uni.request({
			//     url: 'https://  /update', //检查更新的服务器地址
			//     data: {
			//         appid: plus.runtime.appid,
			//         version: plus.runtime.version,
			//         imei: plus.device.imei
			//     },
			//     success: (res) => {
			//         console.log('success', res);
			//         if (res.statusCode == 200 && res.data.isUpdate) {
			//             let openUrl = plus.os.name === 'iOS' ? res.data.iOS : res.data.Android;
			//             // 提醒用户更新
			//             uni.showModal({
			//                 title: '更新提示',
			//                 content: res.data.note ? res.data.note : '是否选择更新',
			//                 success: (showResult) => {
			//                     if (showResult.confirm) {
			//                         plus.runtime.openURL(openUrl);
			//                     }
			//                 }
			//             })
			//         }
			//     }
			// })

			// #endif
			
			let userId=cacheGet('userId');
			//如果登录成功直接到首页
			if(!!userId){
				uni.switchTab({
					url:'/pages/index/index'
				})
			}
		},
		onShow: function() {
			// console.log('App Show')
		},
		onHide: function() {
			// console.log('App Hide')
		}
	}
</script>

<style>
	/*每个页面公共css */
	@import url("iconfont/iconfont.css");

	.pla-class {
		color: #999;
	}

	button:after,
	button:before {
		display: none;
	}

	input {
		border: none;
	}

	.is-link {
		color:  #3c67c2;
	}
	.isGray{
		color: #999 !important;
	}
	
	
	
	.main .main-title {
		box-sizing: border-box;
		width: 100%;
		padding: 0 30upx;
		height: 70upx;
		line-height: 70upx;
		display: flex;
		align-items: center;
		border-bottom: 1px solid #f1f1f1;
		background-color: #fff;
	}
	
	.main .main-title .left {
		flex: 8;
		position: relative;
		font-size: 36upx;
		color: #333;
		padding-left: 20upx;
	}
	
	.main .main-title .left:before {
		position: absolute;
		left: 0;
		top: 22upx;
		content: '';
		width: 4upx;
		height: 30upx;
		background-color: #3c67c2;
	}
	
	.main .main-title .right {
		flex: 2;
		font-size: 32upx;
		color: #666;
		text-align: right;
	}
	
	.main .top-item {
		box-sizing: border-box;
		width: 100%;
		padding: 0 30upx;
		background-color: #fff;
		margin-bottom: 20upx;
		border-bottom: 1px solid #f1f1f1;
	}
    
    .main .top-container {
    	margin-bottom: 20upx;
    	border-bottom: 1px solid #f1f1f1;
    }
	
	.main .down-container .top-item {
		padding: 0;
	}
	
	.main .top-item:last-child {
		margin-bottom: 0;
	}
	
	.main .top-item .title {
		box-sizing: border-box;
		width: 100%;
		height: 60upx;
		line-height: 60upx;
		display: flex;
		align-items: center;
	}
	
	.main .down-container .top-item .title {
		height: 80upx;
		line-height: 80upx;
		border-bottom: 1px solid #f1f1f1;
	}
	
	.main .top-item .title .left {
		flex: 9;
		font-size: 30upx;
		color: #000;
	}
	
	.main .top-item .title .left text {
		margin-left: 40upx;
	}
	
	.main .top-item .title .right {
		flex: 1;
		text-align: right;
	}
	
	.main .top-item .title .right .icon {
		font-size: 40upx;
		color: #3c67c2;
	}
	
	.main .down-container .top-item .title .right .icon {
		color: #999;
	}
	
	.main .top-item .top-inner {
		box-sizing: border-box;
		width: 100%;
		display: flex;
		align-items: center;
		padding: 10upx 0 20upx 0;
	}
	
	.main .down-container .top-item .title {
		padding: 0 30upx;
	}
	
	.main .down-container .top-item .top-inner {
		padding: 10upx 30upx 5upx 30upx;
	}
	
	.main .top-item .top-inner .inner-left {
		flex: 8;
	}
	
	.main .top-item .top-inner .inner-right {
		flex: 2;
	}
	
	.main .top-item .footer-text {
		padding: 10upx 30upx 20upx 30upx;
		font-size: 28upx;
		color: #999;
		line-height: 1.3;
	}
	
	.main .top-item .top-inner .inner-left .top-item-text {
		font-size: 28upx;
		color: #999;
		line-height: 1.5;
	}
	
	.main .top-item .top-inner .inner-right .inner-right-text {
		font-size: 32upx;
		color: #999;
		margin-bottom: 10upx;
	}
	
	.main .top-item .top-inner .inner-right .inner-right-text.status {
		color: #f59a23;
	}
	
	.main .top-item .top-footer {
		box-sizing: border-box;
		width: 100%;
		height: 80upx;
		line-height: 80upx;
		display: flex;
		align-items: center;
		border-top: 1px solid #f1f1f1;
	}
	
	.main .top-item .top-footer .footer-item {
		flex: 1;
		position: relative;
		text-align: center;
	}
	
	.main .top-item .top-footer .footer-item:after {
		position: absolute;
		top: 18upx;
		right: 0;
		content: '';
		width: 2upx;
		height: 50upx;
		background-color: #f1f1f1;
	}
	
	.main .top-item .top-footer .footer-item:last-child:after {
		display: none;
	}
	
	.main .top-item .top-footer .footer-item .icon {
		font-size: 40upx;
		color: #3c67c2;
		margin-right: 14upx;
		vertical-align: middle;
	}
	
	
	.main .top-item .top-footer .footer-item .icon-text {
		font-size: 32upx;
		color: #666;
		vertical-align: middle;
	}
	
	.main .down-item {
		box-sizing: border-box;
		width: 100%;
	
		background-color: #fff;
		margin-bottom: 20upx;
		border-bottom: 1px solid #f1f1f1;
	}
	
	.main .down-item .title {
		box-sizing: border-box;
		width: 100%;
		height: 80upx;
		line-height: 80upx;
		display: flex;
		align-items: center;
		padding: 0 30upx;
		border-bottom: 1px solid #f1f1f1;
	}
	
	.main .down-item .title .left {
		flex: 9;
		font-size: 30upx;
		color: #000;
	}
	
	.main .down-item .title .left text {
		margin-left: 40upx;
	}
	
	.main .down-item .title .right {
		flex: 1;
		text-align: right;
	}
	
	.main .down-item .title .right .icon {
		font-size: 34upx;
		color: #666;
	}
</style>
